# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Emil Renner Berthing <esmil@mailme.dk>
# Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>

pkgname=hdapsd
pkgver=20141203
pkgrel=4
pkgdesc='HDAPS userspace hard drive protection daemon'
arch=('loong64' 'x86_64')
url='https://github.com/evgeni/hdapsd'
license=('GPL')
depends=('glibc' 'bash')
source=("$pkgname-$pkgver.tar.gz::https://github.com/evgeni/${pkgname}/archive/${pkgver}.tar.gz")
md5sums=('1620775e4a0988313dd75b0f1f636674')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./autogen.sh
  ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \
    --with-udevdir=/usr/lib/udev --with-systemdsystemunitdir=/usr/lib/systemd/system
  make ${MAKEFLAGS}
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}/" install
}
